define(function(require){
	var $ = require("jquery");
	var justep = require("$UI/system/lib/justep");
	var MD5 = require('$UI/system/lib/base/md5');	
	var md5 = new MD5();
	
	var Model = function(){
		this.callParent();
	};

	Model.prototype.saveCommit = function(event){
		justep.Util.hint("请致电佛山海锝为您开通账户！");
		localStorage.setItem("lastPage", "regist");	
		this.comp("receiver").windowEnsure();	
		//this.close();
	};

	Model.prototype.mainDataBeforeSave = function(event){
		//debugger;
		var tempPass = this.comp("dataPasswordTemp").getValue("fPassword");
		debugger;
		event.source.setValue("fUserPassword",md5.hex_md5(tempPass));
		event.source.setValue("fRegistDate",new Date());
		event.source.setValue("fUserLevel","最终用户");

	};
	return Model;
});